//
//  MineViewController.m
//  HaHa
//
//  Created by 元虎的mac on 15/9/18.
//  Copyright (c) 2015年 吉亚平. All rights reserved.
//

#import "MineViewController.h"

@interface MineViewController ()
@property (nonatomic) UITableView *Tableview;

//用户头像
@property (nonatomic) UIImageView *userPhoto;
//登陆按钮
@property (nonatomic) UIButton *landingButton;
//设置按钮
@property (nonatomic) UIImageView *setUpButton;
//夜间按钮
@property (nonatomic) UIButton *nightButton;


@end

@implementation MineViewController

- (void)viewDidLoad {
    [super viewDidLoad];
    [self.navigationController setNavigationBarHidden:YES animated:YES];
    self.view.backgroundColor = KArcColor;
    [self AddSubViews];
}

-(void)AddSubViews{
    UIImageView *headerView = [[UIImageView alloc] initWithFrame:CGRectMake(0, 0, kScreenWdth, 240)];
    headerView.image = [UIImage imageNamed:@"jiaoba.jpg"];
    [self.view addSubview:headerView];
    
    
    self.Tableview = [[UITableView alloc] initWithFrame:CGRectMake(0, -20, kScreenWdth, kScreenHeight)];
    self.Tableview.backgroundColor = [UIColor greenColor];
    self.Tableview.tableHeaderView = headerView;
    [self.view addSubview:self.Tableview];
    
    _userPhoto = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenWdth/2-40,headerView.height/2-60, 80, 80)];
    _userPhoto.backgroundColor = KArcColor;
    _userPhoto.layer.masksToBounds = YES;
    _userPhoto.layer.cornerRadius = 40;
    _userPhoto.layer.borderColor = [[UIColor whiteColor] CGColor];
    _userPhoto.layer.borderWidth = 1;
    [headerView addSubview:_userPhoto];
    
    _setUpButton = [[UIImageView alloc] initWithFrame:CGRectMake(kScreenWdth-35, 25, 30, 30)];
    _setUpButton.image = [UIImage imageNamed:@"SetUpButton"];
    _setUpButton.layer.masksToBounds = YES;
    _setUpButton.layer.cornerRadius = 15;
    _setUpButton.alpha = 0.8;
    _setUpButton.backgroundColor = KArcColor;
    [headerView addSubview:_setUpButton];

    
}
- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
